package com.lj.cms.controller;


import com.lj.cms.entity.Banner;
import com.lj.cms.service.BannerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author luojing
 * @since 2021-06-16
 */
@RestController
@RequestMapping("/cms/banner")
@CrossOrigin
public class BannerController {

    @Autowired
    private BannerService bannerService;

    @ApiOperation("查询所有的banner")
    @GetMapping("/selectAllBanner")
    public List<Banner> selectAllBanner(){
        return bannerService.selectAllBanner();
    }

}

